﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace QuanLyDuocPham.View
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class DangNhap_View : Window
    {
        public DangNhap_View()
        {
            InitializeComponent();
        }

        private void btnLogIn_Click(object sender, RoutedEventArgs e)
        {
            Controllers.LOGIN_Control login = new Controllers.LOGIN_Control();

            if (login.Login(txtUserName.Text, txtPassword.Password) == false)
            {
                login.PhanQuyen(Convert.ToInt32(Controllers.staticClass.nguoidungStatic.MA_NHOMND.Trim()));

                this.Hide();
                MessageBox.Show(QuanLyDuocPham.Controllers.staticClass.Conn);
            }
                
            

        }
        

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            QuanLyDuocPham.Controllers.staticClass.loadfilecnn();
        }

    }
}
